$(document).ready(function () {
	$('.createCoursesNm').change(function(){
		var year 	= $(this).val();
		var name	= $('.coursesNm').val();
		if(year.match(/^(19|20)\d\d$/))
	    {
			$('.coursesNm').val('Khóa ' + year.substr(2, 2));
			$('.coursesNote').text('Khuyến tài ' + year);
		}
		
	});
	$('.legendSelect').click(function(){
		var select_id 	= this.id;	
		var box_id		= '#legend-box-'+ select_id;
		var icon_id		= '#select-icon-'+ select_id;
		
		// Set cuttent active
		$('.select-icon').removeClass('legendColorBox-current');
		$(icon_id).addClass('legendColorBox-current');
		
		// Set show box
		$('.education-info').hide();
		$(box_id).show();
	});
});